chore: dead code removal — 6,782 lines#147
Open
JustMaier wants to merge 9 commits intodesign/zero-downtime-deployfrom
Open
chore: dead code removal — 6,782 lines#147JustMaier wants to merge 9 commits intodesign/zero-downtime-deployfrom
JustMaier wants to merge 9 commits intodesign/zero-downtime-deployfrom
Conversation
docs: zero-downtime rolling deploy design
…, rebuild_bench Remove V1 NDJSON loader and supporting infrastructure (~4,200 lines): - src/sync/slot_arena.rs (1016 lines) — V1 memory-mapped slot arena - src/sync/progress.rs (113 lines) — V1 progress server - src/sync/loader.rs (1847 lines) — V1 NDJSON loader - src/sync/copy_queries.rs (364 lines) — V1 hardcoded COPY queries - src/bin/rebuild_bench.rs (906 lines) — stale benchmark binary Also removed: - POST /load handler and LoadRequest struct from server.rs - V1 download path (download_all_tables/download_table/download_single_table) from bulk_loader.rs - ImageScalars, ResourceEnrichment, BulkLoadStats, finalize_from_bitmaps, scalars_to_json, cleanup_orphan_bitmaps and their tests from bulk_loader.rs - AccumSink and its test from ingester.rs (depended on deleted BitmapAccum) - V1 fallback in pg_sync.rs bin replaced with exit(1) + clear error Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- concurrent_engine: remove persist_dirty_dictionaries (no-op), compact_docstore, docstore_schema_version, indexed_field_names (all zero callers) - sort: remove layer_bases, layer_bases_fused (zero callers); move slots_in_range behind #[cfg(test)] - executor: remove with_string_maps, with_case_sensitive_fields, with_dictionaries, with_bitmap_silo, slot_matches_filters (all zero callers outside this file) - filter: remove FilterField::distinct_count (zero callers) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
queries.rs: delete all V1 row structs (ImageRow, TagRow, ToolRow, TechniqueRow, ResourceRow, OutboxRow, MetricRow, CollectionItemRow, StreamTagRow, StreamResourceRow, StreamCollectionRow) and all dead fetch/range functions. Keep: run_setup, run_setup_v2, get_max_ops_id, get_max_outbox_id, upsert_cursor, SETUP_SQL, SETUP_V2_SQL, find_trigger_table, check_triggers_exist. dump_processor.rs: delete ParsedRow::to_csv_row() — zero callers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deleted the HashMap-based eval() path from dump_expression.rs (EvalContext, build_column_index, Expr::eval, FilterExpression::eval, ComputedFieldDef::eval, ExprValue::as_str_value) and the corresponding HashMap-based enrichment wrappers from dump_enrichment.rs (LookupRow::get/to_csv_row/iter_columns, EnrichmentTable::get/child/ enrich/enrich_indexed, EnrichmentManager::enrich_row/enrich_row_indexed/ clear/drop_table/total_memory, resolve_dictionary_value, resolve_expr_to_bitmap_key, DictionarySet). The indexed paths (eval_indexed, enrich_indexed_into_with_buf, enrich_row_indexed_into) are the only live production paths at 107M+ scale. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deleted document_to_ops() (WAL refactor stub with zero external callers), field_value_to_json() (only called by document_to_ops), qvalue_to_json() (private helper for field_value_to_json), extract_multi_ints() (private helper for document_to_ops), and OpsProcessorConfig struct (unused config struct). Removed associated tests and cleaned up unused Duration/PathBuf imports. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd #[cfg(test)] These items have zero production callers — only used in test harnesses in mutation.rs, executor.rs, and planner.rs tests. Gating them with #[cfg(test)] removes them from release builds without deleting the tests that rely on them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deleted handle_patch_documents, handle_filter_sync, FilterSyncRequest, and FilterSyncEntry from server.rs — all returned 501 NOT_IMPLEMENTED with no path to implementation. Removed their route registrations from the router. Client code should use PUT upsert for all document writes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The [[bench]] entry referenced a file that was never committed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LSP-traced dead code removal across 7 tiers. Every deletion was verified via
rust-analyzerreferences + grep to confirm zero live callers.slot_arena.rs(1,016),progress.rs(113),loader.rs(1,847),copy_queries.rs(364),rebuild_bench.rs(906). Remove NDJSONPOST /loadhandler, V1 download path frombulk_loader.rs. Delete dead test/example files.compact_docstore,persist_dirty_dictionaries,docstore_schema_version,indexed_field_names,layer_bases,layer_bases_fused,slot_matches_filters,distinct_countqueries.rs, V1 helpers frombulk_loader.rs, deadParsedRowmethodsEvalContext,Expr::eval(),DictionarySet,enrich_row(), etc.document_to_ops,qvalue_to_json,OpsProcessorConfigMutationEngine,PatchPayload,PatchField,diff_document_partial,diff_patchbehind#[cfg(test)](test-only scaffolding)NOT_IMPLEMENTEDstub endpoints (PATCH /documents/patch,POST /filter-sync)parse_alloc_benchCargo.toml entry (file was never committed)Net: 22 files changed, 25 insertions, 6,782 deletions
Test plan
cargo build --features server,pg-sync— clean (warnings only)cargo test --features server,pg-sync --lib— 598 passed, 0 failed🤖 Generated with Claude Code